package com.pasu.breakreminder.subservices;

import android.content.Context;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;

public class SubServiceSound implements SubService {
    private Context mContext;

    public SubServiceSound(Context context) {
        mContext = context;
    }

    @Override
    public void startSubService() {
        try {
            Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
            Ringtone r = RingtoneManager.getRingtone(mContext, notification);
            r.play();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public void stopSubService() {
        // do nothing
    }
}
